#ifndef ROOM_H
#define ROOM_H

#include "Item.hh"
#include "Enemies.hh"
#include <string>
#include <vector>
#include <map>

class Room {
private:
    std::string name;
    std::string description;
    std::vector<Item*> items;
    std::vector<Enemy*> enemies;
    std::map<std::string, Room*> exits;

public:


    // Special room types
    enum class RoomType {
        NORMAL,
        HEALING,    // Healing room
        DAMAGE,     // Injury room
        TRAP,       // Trap room
        BUFF,       // Blessing room
        CURSE       // Curse Room
    };
    RoomType roomType;


    Room(const std::string& n, const std::string& desc, RoomType type = RoomType::NORMAL);
    ~Room();

    void applyRoomEffect(class Player& player);

    // Get room information
    std::string getName() const;
    std::string getDescription() const;

    // Add and remove items
    void addItem(Item* item);
    Item* removeItem(size_t index);
    const std::vector<Item*>& getItems() const;

    // Add and remove enemies
    void addEnemy(Enemy* enemy);
    void removeEnemy(Enemy* enemy);
    const std::vector<Enemy*>& getEnemies() const;

    // Connecting rooms
    void addExit(const std::string& direction, Room* room);
    Room* getExit(const std::string& direction) const;
    const std::map<std::string, Room*>& getExits() const;

    // Displays room information
    void display() const;
};

#endif // ROOM_H
